<template>
		<Dialog :show="show" v-if="show">
			<view class="sucess">
				<view class="name">{{ info.title }}</view>
				<view class="day" @click="jump">{{ info.more }}</view>
				<view class="btn" @click="submit">确定</view>
			</view>
		</Dialog>
</template>

<script setup lang="ts">
	import Dialog from "./dialog.vue"
	interface Props{
		show: boolean,
		info: {
			name: string
			day: string
			href: string
		}
	}
	
	// 接收父组件传递的对象
	const props = defineProps<Props>();
	const emit = defineEmits(["onOk" , "goVipPage"])
		
	console.log("传递的值------>", props)
	const {show, info }  = props
	
	const jump = () => {
		emit("goVipPage")
	}

	const submit = () => {
		emit("onOk")
	}
	
</script>

<style scoped lang="scss">
	.sucess{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 50upx;
		background-color: #fff;
		.name{
			font-weight: 600;
			font-size: 36upx;
			color: #081A2A;
			text-align: center;
		}
		.day{
			margin: 46upx 0;
			font-weight: 600;
			font-size: 40upx;
			color: #2BC888;
			line-height: 46upx;
		}
		.time{
			margin-bottom: 60upx;
			font-weight: 500;
			font-size: 36upx;
			color: #FF6363;
		}
		.btn{
			width: 550upx;
			height:92upx;
			line-height: 92upx;
			text-align: center;
			background: #2BC888;
			border-radius: 80upx;
			font-weight: 600;
			font-size: 28upx;
			color: #FFFFFF;
		}
	}
</style>